refactor(cli): rename binary digstore -> dig-store with transitional dual-publish - #23
Merged
Merged
Conversation
…dual-publish
Rename the primary CLI binary `digstore` -> `dig-store` to match the renamed
repo (rename epic #703), keeping the `digs` alias and ALL crate/package names
(`digstore-cli`/`digstore-core`/... unchanged — they are published/consumed).
- `[[bin]] name` `digstore` -> `dig-store`; the shared `digstore_cli::run()`
entrypoint already self-reports its argv[0] program name, so `dig-store`
reports `dig-store` and `digs` reports `digs` (verified).
- Release build (`build-binaries.yml`): DUAL-PUBLISH for one transition cycle —
both the new `dig-store-*` and the legacy `digstore-*` bare binaries + apt
tarballs, so apt.dig.net + dig-installer stay green until they cut over. The
apt tarball ships a `digstore` -> `dig-store` compat symlink at its root. The
`digs` asset name is derived INDEPENDENTLY (the old `${DIGS_BIN/digstore/digs}`
substring trick is broken after the rename — `dig-store` has no `digs`
substring), guarded by a new shape test.
- Self-updater (`update.rs`): prefer the `dig-store` stem over the legacy
`digstore`/`digs` alias, and extract the real `dig-store` file from the tarball
(skipping the compat symlink), with a `digstore` fallback for older releases.
- `release.yml` / `publish-binary.yml`: build + upload the `dig-store` binary;
the dighub S3 hub-worker layout (`digstore/<ver>/digstore`) is UNCHANGED (it is
the compile-worker's contract, a separate consumer not cut over here).
- `action.yml`: call `dig-store` at runtime; repo -> `DIG-Network/dig-store`.
- crate `repository=` metadata (`digstore-core`, `dig-client-wasm`) -> dig-store.
- SPEC.md / README / runbook / issue templates: binary/product/repo-URL refs ->
dig-store; `digs` alias invocations and historical CHANGELOG untouched.
Version: MINOR (0.13.5 -> 0.14.0) — user-facing binary rename that stays
backwards-compatible via the transitional dual-publish + compat symlink + the
`digs` alias, so no consumer breaks.
Refs #703
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
Step [2] of the rename epic #703 (RELEASE-FIRST). Rename the primary CLI binary
digstore->dig-storeto match the renamed repo, keeping thedigsalias and ALL crate/package names, so the downstream apt.dig.net + dig-installer cutover lanes have a releaseddig-storebinary/assets to depend on.Changes
crates/digstore-cli/Cargo.toml[[bin]] namedigstore->dig-store.digsalias,[package] name = digstore-cli,[lib] name = digstore_cli, and every library crate name are UNCHANGED (published/consumed — out of scope by the canonical convention). The shareddigstore_cli::run()entrypoint self-reports its argv[0] program name, sodig-store --versionreportsdig-store 0.14.0anddigs --versionreportsdigs 0.14.0(verified against the built binaries).build-binaries.yml) — for ONE transition cycle every asset is published under BOTH the newdig-store-*stem AND the legacydigstore-*stem (bare per-OS binaries + apt.tar.gz), so apt.dig.net + dig-installer stay green until they cut over.--bin digstore --bin digs->--bin dig-store --bin digs.${DIGS_BIN}substring fix (load-bearing) — the oldDIGS_BIN="${DIGS_BIN/digstore/digs}"derived thedigsasset name by substring replacement on the primary. After the rename the primary isdig-store, which contains NOdigssubstring, so the trick is broken. Thedigsname is now derived INDEPENDENTLY (digs+ the OS.exesuffix), guarded by a new shape test..tar.gz(and the .deb layout via apt) ships adigstore->dig-storesymlink at its root for one cycle, so scripts callingdigstoredirectly keep working (thedigsalias already shields interactive users).update.rs) —select_binary_assetnow prefers the primarydig-storestem over the legacydigstore/digsalias (fixes a latent ambiguity: today's releases already ship bothdigstore-*anddigs-*raw assets, so a naive first-match could self-replace with the alias).extract_digstore_from_targzextracts the realdig-storefile (skipping the compat symlink) with adigstorefallback so adig-storebinary can still update from an older, pre-rename tarball.release.yml/publish-binary.yml— build + upload thedig-storebinary. The dighub S3 hub-worker layout (digstore/<ver>/digstore+latest.json) is UNCHANGED — it is the hub compile-worker's contract, a separate consumer NOT cut over in this lane.action.yml— runtime invocations calldig-store;repository: DIG-Network/digstore->dig-store.cargo install --path crates/digstore-cliunchanged (package name kept).repository=metadata —digstore-core+dig-client-wasm(+ the wasm pkg assembler) ->github.com/DIG-Network/dig-store.digsalias invocations + historical CHANGELOG untouched; crate names (digstore-*) preserved.SemVer rationale
MINOR (0.13.5 -> 0.14.0): a user-facing binary rename that stays backwards-compatible via the transitional dual-publish +
digstorecompat symlink + thedigsalias — no consumer breaks.Verification
cargo build -p digstore-cli --binsgreen;dig-store/digsbinaries self-report their own names +Usage:lines.cargo test -p digstore-cligreen (46 test-result blocks, 0 failures), incl. newupdate.rstests (dual-publish stem preference, dig-store extraction, compat-symlink skip) + newnightly_release_workflow_shape.rsguards (dual-publish both stems, compat symlink, independentdigs-name derivation).cargo fmt --all -- --checkclean;cargo clippy -p digstore-cli --all-targets --all-features -- -D warningsclean.Blast radius (gitnexus + manual)
invoked_bin_name()(arg0-derived) is consumed only bylib.rs+completion.rs, so the program name flips todig-storeautomatically for usage/version/help-json/completions — the only test assertions updated are those dynamic-name checks + thecargo_bin("digstore")->cargo_bin("dig-store")invocations. In-CLI hardcoded help EXAMPLES (digstore init, ...) were intentionally LEFT asdigstorefor this transitional release (they remain runnable via the compat symlink); canonicalizing them to the dynamic invoked-name is filed as a follow-up.Do NOT merge yet
Hand back to the review gate. After merge + a
dig-storerelease (release-first) + pointer bump, dispatch the apt [3a] + dig-installer [3b] cutover lanes.Refs #703